// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_FIN_SUPPLIER_ACCOUNT
// * CreateDate    : 2012/2/2 10:17:12
// * Creater       : CodeSmith
// * LastChangeDate: 2012/2/2 10:17:12
// * LastChanger   : 2012/2/2 10:17:12
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;

namespace ESOL.Common.Entity
{
	[Serializable]
	public partial class FinSupplierAccountEntity : EntityBase
    {
        public FinSupplierAccountTable TableSchema
        {
            get
            {
                return FinSupplierAccountTable.Current;
            }
		}
		
		public FinSupplierAccountEntity()
        {

        }
		
		public FinSupplierAccountEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.SupplierAccountId = Convert.ToString(CommonFunctions.ToObject(dr["SUPPLIER_ACCOUNT_ID"]));
			this.SupplierId = Convert.ToString(CommonFunctions.ToObject(dr["SUPPLIER_ID"]));
			this.PurchaseOrderAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["PURCHASE_ORDER_AMOUNT"]));
			this.BillingAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["BILLING_AMOUNT"]));
			this.PaidAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["PAID_AMOUNT"]));
			this.PayableAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["PAYABLE_AMOUNT"]));
			this.ArrivedAmountNoBilling = Convert.ToDecimal(CommonFunctions.ToObject(dr["ARRIVED_AMOUNT_NO_BILLING"]));
			this.ArrivedAmountBilled = Convert.ToDecimal(CommonFunctions.ToObject(dr["ARRIVED_AMOUNT_BILLED"]));
        }
		
		public FinSupplierAccountEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.SupplierAccountId = Convert.ToString(CommonFunctions.ToObject(dr["SUPPLIER_ACCOUNT_ID"]));
			this.SupplierId = Convert.ToString(CommonFunctions.ToObject(dr["SUPPLIER_ID"]));
			this.PurchaseOrderAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["PURCHASE_ORDER_AMOUNT"]));
			this.BillingAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["BILLING_AMOUNT"]));
			this.PaidAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["PAID_AMOUNT"]));
			this.PayableAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["PAYABLE_AMOUNT"]));
			this.ArrivedAmountNoBilling = Convert.ToDecimal(CommonFunctions.ToObject(dr["ARRIVED_AMOUNT_NO_BILLING"]));
			this.ArrivedAmountBilled = Convert.ToDecimal(CommonFunctions.ToObject(dr["ARRIVED_AMOUNT_BILLED"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return FinSupplierAccountTable.Current;
            }
        }
		
		#region Perporty List
        public string SupplierAccountId
        {
            get { return Convert.ToString(GetData(FinSupplierAccountTable.C_SUPPLIER_ACCOUNT_ID)); }
            set { SetData(FinSupplierAccountTable.C_SUPPLIER_ACCOUNT_ID, value); }
        }
		
        public string SupplierId
        {
            get { return Convert.ToString(GetData(FinSupplierAccountTable.C_SUPPLIER_ID)); }
            set { SetData(FinSupplierAccountTable.C_SUPPLIER_ID, value); }
        }
		
        public decimal PurchaseOrderAmount
        {
            get { return Convert.ToDecimal(GetData(FinSupplierAccountTable.C_PURCHASE_ORDER_AMOUNT)); }
            set { SetData(FinSupplierAccountTable.C_PURCHASE_ORDER_AMOUNT, value); }
        }
		
        public decimal BillingAmount
        {
            get { return Convert.ToDecimal(GetData(FinSupplierAccountTable.C_BILLING_AMOUNT)); }
            set { SetData(FinSupplierAccountTable.C_BILLING_AMOUNT, value); }
        }
		
        public decimal PaidAmount
        {
            get { return Convert.ToDecimal(GetData(FinSupplierAccountTable.C_PAID_AMOUNT)); }
            set { SetData(FinSupplierAccountTable.C_PAID_AMOUNT, value); }
        }
		
        public decimal PayableAmount
        {
            get { return Convert.ToDecimal(GetData(FinSupplierAccountTable.C_PAYABLE_AMOUNT)); }
            set { SetData(FinSupplierAccountTable.C_PAYABLE_AMOUNT, value); }
        }
		
        public decimal ArrivedAmountNoBilling
        {
            get { return Convert.ToDecimal(GetData(FinSupplierAccountTable.C_ARRIVED_AMOUNT_NO_BILLING)); }
            set { SetData(FinSupplierAccountTable.C_ARRIVED_AMOUNT_NO_BILLING, value); }
        }
		
        public decimal ArrivedAmountBilled
        {
            get { return Convert.ToDecimal(GetData(FinSupplierAccountTable.C_ARRIVED_AMOUNT_BILLED)); }
            set { SetData(FinSupplierAccountTable.C_ARRIVED_AMOUNT_BILLED, value); }
        }
		
		#endregion
	}
	
	
}	

